package com.ruoyi.project.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysCompanyMapper;
import com.ruoyi.project.system.domain.SysCompany;
import com.ruoyi.project.system.service.ISysCompanyService;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author theme
 * @date 2020-05-27
 */
@Service
public class SysCompanyServiceImpl implements ISysCompanyService {
    @Autowired
    private SysCompanyMapper sysCompanyMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public SysCompany selectSysCompanyById(Long id) {
        return sysCompanyMapper.selectSysCompanyById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param sysCompany 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<SysCompany> selectSysCompanyList(SysCompany sysCompany) {
        return sysCompanyMapper.selectSysCompanyList(sysCompany);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param sysCompany 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertSysCompany(SysCompany sysCompany) {
        return sysCompanyMapper.insertSysCompany(sysCompany);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param sysCompany 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateSysCompany(SysCompany sysCompany) {
        sysCompany.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyMapper.updateSysCompany(sysCompany);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param details 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteSysCompanyByIds(String[] details) {
        return sysCompanyMapper.deleteSysCompanyByIds(details);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param detail 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteSysCompanyById(String detail) {
        return sysCompanyMapper.deleteSysCompanyById(detail);
    }
}
